/**
 * 
 */
package actions;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import autoincrementor.AutoIncrementor;




/**
 * @author Jeremy Bergan
 *
 */
public class AutoIncrementorAction extends AwesomeMenuAction {

	AutoIncrementor inc;
	
	public AutoIncrementorAction(String name, String desc)
	{
		super(name, desc);
		putValue(MNEMONIC_KEY, new Integer(KeyEvent.VK_I));
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
			if(inc == null){
				inc = new AutoIncrementor(getSelectedTextPane(arg0));
			}
			else{
				inc.setVisible(true);
			}
	}
}
